﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GeneticAlgorithm;
using OxyPlot.Series;

namespace DesigneSpaceExplorerVEGA.Adapters
{
    public class DspScatterPointAdapter
    {
        public static List<ScatterPoint> ToScatterPointList(List<SimulatedConfiguration> configurations )
        {
            var result = new List<ScatterPoint>();
            foreach (var configuration in configurations)
            {
                var normalizedIpc = 1/configuration.GetScore("ipc");
                var power = configuration.GetScore("power");
                var point = new ScatterPoint(normalizedIpc, power);
                result.Add(point);
            }
            return result;
        }
    }
}
